<include file="public/layout"/>
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>

<div class="page">
    <div class="fixed-bar">
        <div class="item-title">
            <div class="subject">
                <h3>奖项设置</h3>
                <h5>升级奖励设置</h5>
            </div>
        </div>
    </div>
    <!-- 操作说明 -->
    <div class="explanation" id="explanation">
        <div class="title" id="checkZoom"><i class="fa fa-lightbulb-o"></i>
            <h4 title="提示相关设置操作时应注意的要点">操作提示</h4>
            <span id="explanationZoom" title="收起提示"></span></div>
        <ul>
            <li>切不可频繁更改</li>
        </ul>
    </div>
    <form method="post" enctype="multipart/form-data" id="handlepost" name="form1" action="{:U('World.World/handle')}">
        <input type="hidden" name="inc_type" value="updateLevel-{$level_id}">
        <div class="ncap-form-default">
            <dl class="row">
                <dt class="tit">
                    <label>是否开启</label>
                </dt>
                <dd class="opt">
                    <div class="onoff">
                        <label for="switch1" class="cb-enable  <if condition="$config['switch'] eq 1">selected</if>">是</label>
                        <label for="switch2" class="cb-disable <if condition="$config['switch'] eq 2">selected</if>">否</label>switch
                        <input type="radio" onclick="$('#switch_on_off').show();"  id="switch1"  name="switch" value="1" <if condition="$config['switch'] eq 1">checked="checked"</if>>
                        <input type="radio" onclick="$('#switch_on_off').hide();" id="switch2" name="switch" value="2" <if condition="$config['switch'] eq 2">checked="checked"</if> >
                    </div>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label for="give_money">赠送矿池资产：</label>
                </dt>
                <dd class="opt">
                    <input pattern="^\d{1,}$" id="give_money" name="give_money" value="{$config.give_money|default=0}" class="input-txt" type="text">
                    <span class="err"></span>
                    <p class="notic"></p>
                </dd>
            </dl>

            <div class="bot"><a href="JavaScript:void(0);" class="ncap-btn-big ncap-btn-green"  onclick="adsubmit()" >确认提交</a></div>
        </div>
    </form>
</div>
<script type="text/javascript">

</script>
<div id="goTop">
    <a href="JavaScript:void(0);" id="btntop">
        <i class="fa fa-angle-up"></i>
    </a>
    <a href="JavaScript:void(0);" id="btnbottom">
        <i class="fa fa-angle-down"></i>
    </a>
</div>
</body>
<script>
    function ajax_subimit(da){
        $.ajax({
            type: "POST",
            url: "/index.php/Admin/Distribut.Distribut/ajax_prize",
            data: da,
            success: function(res){
                layer.msg('保存成功！', {icon: 1});
            }
        })
    }
    function adsubmit(action){
        //异步提交
        var da = $('#handlepost').serialize();
        ajax_subimit(da)

    }
</script>
</html>